r = LONGUNIT(m,comp) creates unit vector same size as vector m along dimension of comp ARGUMENTS m ... vector used for sizing comp ... direction. 'i','j','k' or 'x', 'y', 'z' RETURNS r ... unit vector size of m Example m = randn(100,1); r = longunit(m,'j') returns an 100 x 3 matrix with colums 1 and 3 containing zeros and column 2 containing ones